from django.db import models
from rest_framework import serializers
from django.contrib.auth.models import AbstractUser
class User(AbstractUser):
    # username = models.CharField('用户名',unique=True,max_length=100)
    # password = models.CharField('密码',max_length=100)
    phone = models.CharField('手机号',max_length=11)
    # email = models.EmailField('邮箱',max_length=30)
    def __str__(self):
        return self.username
    class Meta:
        db_table='user'
        verbose_name_plural='用户表'
class UserSer(serializers.Serializer):
    class Meta:
        model = User
        fields='__all__'




